﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace LuanVanProject
{
    /// <summary>
    /// Interaction logic for NewTreeNode.xaml
    /// </summary>
    public partial class NewTreeNode : Window
    {
        public string result;
        public bool msg;
        public NewTreeNode()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            if (textBox1.Text == "")
            {
                MessageBox.Show("Please enter the idea");
            }
            else
            {
                result = textBox1.Text;
                this.msg = true;
                this.Close();
            }
            
        }

        private void button2_Click(object sender, RoutedEventArgs e)
        {
            this.msg = false;
            this.Close();
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            FocusManager.SetFocusedElement(this,textBox1);  
        }
    }
}
